package com.hxs.hxsserver.utils;

import java.util.Random;

public class NickNameGenerator {

    public static String generateNickName(String baseStr) {
        String characters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        StringBuilder randomString = new StringBuilder(baseStr);
        int length = 6;
        Random random = new Random();

        for (int i = 0; i < length; i++) {
            int index = random.nextInt(characters.length());
            randomString.append(characters.charAt(index));
        }

        return randomString.toString();
    }

}
